﻿/*
 * NodeFactory
 * 
 * Author: snowdreamist
 * Date: 2011/11/22
 * 
 */

using System;
using System.Collections.Generic;
using System.Net;
using System.Linq;
using System.Text;

namespace BitTorrentSharp.DHT
{
    public class NodeFactory
    {
        internal NodeFactory(DHTEngine engine)
        {
            if (engine == null)
                throw new ArgumentNullException("engine");
            this._engine = engine;
        }

        #region private

        private DHTEngine _engine;

        #endregion

        internal Node CreateNode(NodeID id, IPEndPoint endPoint)
        {
            if (id == null)
                throw new ArgumentNullException("id");
            if (endPoint == null)
                throw new ArgumentNullException("endPoint");

            return new Node(this._engine, id, endPoint);
        }
    }
}
